﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Utilities;

namespace Repository
{
    public class ConfigUtil
    {
        public static DataTable buildBrowserTypesDataTable()
        {
            XMLGetter xmlGetter = new XMLGetter();
            xmlGetter.setXmlFilePath(Utilities.GlobalFile.CONFIG_FILENAME);
            xmlGetter.setMasterNode("SM2");
            xmlGetter.setHeaderNode("global");
            xmlGetter.setLine1Node("browser");
            xmlGetter.setLine2Node("variable");

            DataTable dtTarget = xmlGetter.getLine2NodeValues();
            return dtTarget;
        }

        public static DataTable buildServersTypesDataTable()
        {
            XMLGetter xmlGetter = new XMLGetter();
            xmlGetter.setXmlFilePath(Utilities.GlobalFile.SERVERS_FILENAME);
            xmlGetter.setMasterNode("SM2");
            xmlGetter.setHeaderNode("SERVERS");
            xmlGetter.setLine1Node("variable");

            DataTable dtTarget = xmlGetter.getLine1NodeValues();
            return dtTarget;
        }
    }
}
